package com.example.rocketmqspringbootdemo.service.producer;

import com.example.rocketmqspringbootdemo.pojo.User;

public interface SendService {

    //同步发送字符串
    String syncSendStringMessage(String message, String destination);
    //同步发送对象
    String syncSendObjectMessage(Object payload, String destination);

    //同步发送字符串并指定TAG
    String syncSendStringMessageWithTag(String message, String topic, String tag);
    //同步批量发送消息并指定TAG
    String  syncSendCollectionMessage(String message, String topic, String tag, Integer batchSize);
    //同步发送顺序消息
    String syncSendBatchStringMessageOrderly(String destination);
    //同步发送reply消息
    String syncSendStringReply(String message, String topic,String tag);


    //异步发送对象
    String asyncSendObjectMessage(Object payload, String destination);
    //异步发送延迟消息并指定TAG
    String asyncSendDelayWithTag(Object payload, String topic, String tag, Integer level);
    //异步发送顺序消息
    String asyncSendOrderly(String destination);
    //异步发送reply消息
    String asyncSendUserReply(User user, String topic, String tag);

    //发送单向消息
    void onewaySendString(String message, String destination);
    void onewaySendStringOrderly(String destination);

    //发送事务消息
    void sendTransactionMessage(String destinnation);
}
